In the Assistant, select the Properties tab. The specification settings--the Query, Task, and Entity pull-down lists--should be set to <All>, query, and Movie, respectively. The settings are probably correct, but if any of the settings are different, change them. A simple way to set the Task and Entity pull-down lists is to select the Movie tab in the Query Window. The Assistant automatically updates to set the Task pull-down list to query and the Entity pull-down list to Movie.
Move plotSummary and voting to the Other Property Keys list. Move category and studio to Property Keys. Using the up and down arrows, order the properties as follows: title, category, studio.
Save the changes, and restart the application (from the Assistant). The Movie pane of the Query Window is reconfigured.
Note that a Studio Name field is now available. This is because you specified the studio relationship as a property key for the query task. When a to-one relationship (such as studio) is specified as a property key, Direct to Java Client uses identifyproperty keys of the relationship's destination object to represent the relationship in the user interface.
In the Assistant, set the Task pull-down list to identify and set the Entity pull-down list to Studio. Observe that the Studio has one identify property key--name. This attribute is used to "identify" a particular Studio when it appears in the user interface as a destination of a to-one relationship.
One example of how the identify property keys are used is in the Movie pane of the Query Window. Movie's studio relationship is specified as a query property key. To represent studio as a property key in the Query Window, Direct to Java Client uses the identify property key (name) of the relationship's destination entity (Studio).
Another example is the Studio part of a Movie window, in which the Movie's Studio is identified by its name.
Set the Assistant's Entity pull-down list to Movie, keeping the Task as identify. Movie has one identify property key, title. Since it's quite common for movie remakes to use the same name as the original, a movie's title isn't always enough to identify it. Add dateReleased to Movie's list of identify properties, and save the change.
The property keys for the list task are used in result lists such as the ones in the Query Window. When you search for Movies, for example, the Movies in the result set are listedin the Query Window's table. The result table has a column for the list property keys, title, category, dateReleased, posterName, revenue, trailerName, and plotSummary. The columns for these properties are crowded into the table, and many aren't particularly helpful to users.
So users can verify that all the search criteria they specify is applied correctly, the list property keys should be a super set of the query properties. Since users can search for Movies by Studio, the list property keys should include studio, as well. Add studio to the list property keys.
Save the changes. To see them, open a new Query Window.
In the Query Window, click New to create a Movie form window. The Assistant updates to set the Task pull-down list to form and the Entity pull-down list to Movie.
Examine the form window. As is most commonly the case, the default property keys for the form task are correct for this application. In general, the form window should allow users to edit all of an entity's client class properties. However, you might want to reorder the properties so they appear in different locations in the form window.
Using the up and down buttons, order the properties as follows: title, category, dateReleased, revenue (move up), posterName, trailerName, plotSummary, directors, roles, voting, reviews, studio. Save the changes, and open a new Movie form window to see how they affect the form window layout.